package com.glb.gilibuy.entity;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * product_discussion
 * @author 
 */
@ApiModel(value="com.glb.gilibuy.entity.ProductDiscussion商品讨论表")
@Data
public class ProductDiscussion implements Serializable {
    /**
     * id
     */
    @ApiModelProperty(value="id")
    private Long id;

    /**
     * 讨论id
     */
    @ApiModelProperty(value="讨论id")
    private String discussionId;

    /**
     * 商品id
     */
    @ApiModelProperty(value="商品id")
    private String productId;

    /**
     * 用户id
     */
    @ApiModelProperty(value="用户id")
    private String userId;

    /**
     * 父讨论id
     */
    @ApiModelProperty(value="父讨论id")
    private String parentDiscussionId;

    /**
     * 讨论内容
     */
    @ApiModelProperty(value="讨论内容")
    private String discussionContent;

    /**
     * 创建时间
     */
    @ApiModelProperty(value="创建时间")
    private Date gmtCreate;

    /**
     * 更新时间
     */
    @ApiModelProperty(value="更新时间")
    private Date gmtModified;

    /**
     * 是否被删除：0->否；1->是
     */
    @ApiModelProperty(value="是否被删除：0->否；1->是")
    private Integer isDeleted;

    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        ProductDiscussion other = (ProductDiscussion) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getDiscussionId() == null ? other.getDiscussionId() == null : this.getDiscussionId().equals(other.getDiscussionId()))
            && (this.getProductId() == null ? other.getProductId() == null : this.getProductId().equals(other.getProductId()))
            && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
            && (this.getParentDiscussionId() == null ? other.getParentDiscussionId() == null : this.getParentDiscussionId().equals(other.getParentDiscussionId()))
            && (this.getDiscussionContent() == null ? other.getDiscussionContent() == null : this.getDiscussionContent().equals(other.getDiscussionContent()))
            && (this.getGmtCreate() == null ? other.getGmtCreate() == null : this.getGmtCreate().equals(other.getGmtCreate()))
            && (this.getGmtModified() == null ? other.getGmtModified() == null : this.getGmtModified().equals(other.getGmtModified()))
            && (this.getIsDeleted() == null ? other.getIsDeleted() == null : this.getIsDeleted().equals(other.getIsDeleted()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getDiscussionId() == null) ? 0 : getDiscussionId().hashCode());
        result = prime * result + ((getProductId() == null) ? 0 : getProductId().hashCode());
        result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
        result = prime * result + ((getParentDiscussionId() == null) ? 0 : getParentDiscussionId().hashCode());
        result = prime * result + ((getDiscussionContent() == null) ? 0 : getDiscussionContent().hashCode());
        result = prime * result + ((getGmtCreate() == null) ? 0 : getGmtCreate().hashCode());
        result = prime * result + ((getGmtModified() == null) ? 0 : getGmtModified().hashCode());
        result = prime * result + ((getIsDeleted() == null) ? 0 : getIsDeleted().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", discussionId=").append(discussionId);
        sb.append(", productId=").append(productId);
        sb.append(", userId=").append(userId);
        sb.append(", parentDiscussionId=").append(parentDiscussionId);
        sb.append(", discussionContent=").append(discussionContent);
        sb.append(", gmtCreate=").append(gmtCreate);
        sb.append(", gmtModified=").append(gmtModified);
        sb.append(", isDeleted=").append(isDeleted);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}